import java.util.*;

interface Student {
	float getGrade();
}

class StudentImpl implements Student {
	public float getGrade() {
		return 42f;
	}
}

public class Average {
	public float getAverage(Iterable<Student> students) {
		float acc = 0;
		int count = 0;

		for (Student s : students) {
			acc += s.getGrade();
			count++;
		}

		return acc / count;
	}

	public static void main(String[] args) {
		List<Student> myStudents = new ArrayList<Student>();
		Average avg = new Average();

		myStudents.add(new StudentImpl());
		myStudents.add(new StudentImpl());
		myStudents.add(new StudentImpl());

		System.out.println(avg.getAverage(myStudents));
	}
}
